<!DOCTYPE html>
{% load static %}
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="{% static 'css/login.css' %}">
    <script src="{% static 'js/jquery-3.6.0.js' %}"></script>
    <title>CoolYunTest自动化测试平台</title>
    <style>

    </style>
</head>
<body style="background: url('{% static 'images/login-background.png' %}') no-repeat center center fixed">

<div class="right-area">
    <div class="login-box">
        <div class="brand"> CoolYunTest</div>
        <form id="login-form" method="post">
            <div class="input-group">
                {{ form.username }}
                <div id="error-{{ form.username.name }}" class="filed-error"></div>
            </div>

            <div class="input-group">
                {{ form.password }}
                <div id="error-{{ form.password.name }}" class="filed-error"></div>
            </div>

            <div class="captcha-group">
                <label for="captcha-input"></label>
                {{ form.captcha }}
                <div id="error-{{ form.captcha.name }}" class="filed-error"></div>
                <img id="captcha-image" src="#" alt="验证码获取失败">
            </div>

            <button type="submit" class="btn btn-primary">登录</button>

            <!-- 短信登录切换 -->
            <a href="javascript:switchLoginType()" class="sms-login-link">
                <img src="{% static 'images/sms-icon.png' %}" alt="短信登录">
                短信验证码登录
            </a>
        </form>

        <div id="error-login-failed">fadfadfafdfa</div>
    </div>

</div>
<script src="{% static 'js/login.js' %}"></script>
<script>
    const csrftoken = "{{ csrf_token }}";  // 直接注入Token
</script>
</body>
</html>


